<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue"></script>
    <style>
 
    </style>
</head>
<body>
    <div id="app">
        <my-header txt='书影音' src1='img/ai-home.png' src2='img/gouwuche.png'></my-header>
        <my-header txt='广播' src1='img/gouwuche_1.png' src2='img/gouwuche_2.png'></my-header>
        <my-header txt='小组' src1='img/gouwuche_3.png' src2='img/jiaruxiaozu.png'></my-header>
        <my-header txt='我的' src1='img/redian.png' src2='img/rediantubiao.png'></my-header>
    </div>
    <!-- 定义组件模板 -->
    <template id="head">
        <div class="headerWrap">
            <span>{{txt}}</span>
            <img :src="src1" class="b">
            <img :src="src2" class="">
        </div>
    </template>
</body>
<script type="text/javascript">
var vm=new Vue({
    el:'#app',
    data:{

    },
    components:{
        'myHeader':{
            template:'#head',
            props: ['txt','src1','src2']
        }
    }
});
</script>
</html>